import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建奖罚管理
export function createRewardPunishRecord(data) {
  return request({
    url: adminUrl + '/collegebase/reward-punish-record/create',
    method: 'post',
    data: data
  })
}

// 更新奖罚管理
export function updateRewardPunishRecord(data) {
  return request({
    url: adminUrl + '/collegebase/reward-punish-record/update',
    method: 'put',
    data: data
  })
}

// 删除奖罚管理
export function deleteRewardPunishRecord(id) {
  return request({
    url: adminUrl + '/collegebase/reward-punish-record/delete?id=' + id,
    method: 'delete'
  })
}

// 获得奖罚管理
export function getRewardPunishRecord(id) {
  return request({
    url: adminUrl + '/collegebase/reward-punish-record/get?id=' + id,
    method: 'get'
  })
}

// 获得奖罚管理分页
export function getRewardPunishRecordPage(query) {
  return request({
    url: adminUrl + '/collegebase/reward-punish-record/page',
    method: 'get',
    params: query
  })
}

// 导出奖罚管理 Excel
export function exportRewardPunishRecordExcel(query) {
  return request({
    url: adminUrl + '/collegebase/reward-punish-record/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
